Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix critical bug in API class #52

Merged
merged 3 commits into from
Mar 24, 2021
Merged

Fix critical bug in API class #52

merged 3 commits into from
Mar 24, 2021

Conversation

nvandoorn
Copy link
Member

What is the goal of this PR?

In #34, we modified .default_taxjar_client to include the API version,
and then the name of the plugin, but we also introduced a critical bug.
Taxjar::Client#set_api_config returns a hash and not the TaxJar
client, so it is not safe to chain the method call. As such, we add a
spec to cover this case and patch the class method.

How do you manually test these changes? (if applicable)

  1. Setup a sandbox store bin/rails-sandbox server
  2. Setup the store to use this gem as the default tax calculator
  3. Checkout from the store and verify you see taxes on the page

Merge Checklist

  • Run the manual tests
  • Update the changelog

nvandoorn and others added 2 commits March 24, 2021 11:39
This was not used and should be removed.

Co-authored-by: Noah Silvera <[email protected]>
In #34, we modified `.default_taxjar_client` to include the API version,
and then the name of the plugin, but we also introduced a critical bug.
`Taxjar::Client#set_api_config` returns a hash and not the TaxJar
client, so it is not safe to chain the method call. As such, we add a
spec to cover this case and patch the class method.

Co-authored-by: Noah Silvera <[email protected]>
Co-authored-by: Noah Silvera <[email protected]>
@nvandoorn nvandoorn merged commit 2366895 into SuperGoodSoft:master Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants